<?php
/**
 * 压缩过滤器
 */
namespace app\service\RpcService\Helper;

use Hprose\Filter;
use stdClass;

class CompressFilter implements Filter
{
    public function inputFilter($data, stdClass $context) {
        return gzdecode($data);
    }
    public function outputFilter($data, stdClass $context) {
        return gzencode($data);
    }
}
